<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Kablosuz Izci: Pozisyon.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Kablosuz Izci
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Pozisyon.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef Pozisyon_h__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define Pozisyon_h__</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;map&gt;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="preprocessor">#define _USE_MATH_DEFINES</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00009"></a>00009 
<a name="l00017"></a><a class="code" href="class_koordinat.html">00017</a> <span class="keyword">class </span><a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a> 
<a name="l00018"></a>00018 {
<a name="l00019"></a>00019 <span class="keyword">public</span>:
<a name="l00023"></a>00023     <a class="code" href="class_koordinat.html#a9dd8a9feb228d93047454b12be5e7f81" title="Default constructor (disabled)">Koordinat</a>(); <span class="comment">// Bu constructorin cagrilmamasi icin sadece decl. yapip impl. yapmamak yeterli oluyor. C++11 ozelligi olan Koordinat() = delete; bu VS versiyonunda yok.</span>
<a name="l00024"></a>00024     
<a name="l00031"></a><a class="code" href="class_koordinat.html#a1a9f689b1aa0c6e7d7bc5650e85ba97c">00031</a>     <a class="code" href="class_koordinat.html#a9dd8a9feb228d93047454b12be5e7f81" title="Default constructor (disabled)">Koordinat</a>(<span class="keywordtype">double</span> _x, <span class="keywordtype">double</span> _y, <span class="keywordtype">double</span> _z) 
<a name="l00032"></a>00032         : x(_x), y(_y), z(_z){}
<a name="l00033"></a>00033 
<a name="l00037"></a><a class="code" href="class_koordinat.html#a070da5d985f3bfcaafd623e54579460d">00037</a>     <a class="code" href="class_koordinat.html#a070da5d985f3bfcaafd623e54579460d" title="Default destructor.">~Koordinat</a>(){}
<a name="l00038"></a>00038 
<a name="l00044"></a><a class="code" href="class_koordinat.html#aac490e0e57400dde6a322bb46ed65d8b">00044</a>     <span class="keyword">const</span> <a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a>&amp; <a class="code" href="class_koordinat.html#aac490e0e57400dde6a322bb46ed65d8b" title="Bu nesnenin butun elemanlari.">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a>&amp; diger)
<a name="l00045"></a>00045     {
<a name="l00046"></a>00046         x = diger.x;
<a name="l00047"></a>00047         y = diger.y;
<a name="l00048"></a>00048         z = diger.z;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00051"></a>00051     }
<a name="l00052"></a>00052 
<a name="l00053"></a>00053     <span class="keywordtype">double</span> x;
<a name="l00054"></a>00054     <span class="keywordtype">double</span> y;
<a name="l00055"></a>00055     <span class="keywordtype">double</span> z;
<a name="l00056"></a>00056 };
<a name="l00057"></a>00057 
<a name="l00065"></a><a class="code" href="class_oryantasyon.html">00065</a> <span class="keyword">class  </span><a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a>
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 <span class="keyword">public</span>:
<a name="l00071"></a>00071     <a class="code" href="class_oryantasyon.html#aff1a8f4e6d4e206d956ee68c9d4564fd" title="Default constructor.">Oryantasyon</a>();
<a name="l00072"></a>00072 
<a name="l00079"></a><a class="code" href="class_oryantasyon.html#a4004cf8f99445e1a070d77670009e6cd">00079</a>     <a class="code" href="class_oryantasyon.html#aff1a8f4e6d4e206d956ee68c9d4564fd" title="Default constructor.">Oryantasyon</a>(<span class="keywordtype">double</span> _azimuth, <span class="keywordtype">double</span> _pitch, <span class="keywordtype">double</span> _roll) 
<a name="l00080"></a>00080         : azimuth(_azimuth), pitch(_pitch), roll(_roll){}
<a name="l00081"></a>00081     
<a name="l00086"></a><a class="code" href="class_oryantasyon.html#acf7d589d8457438ca0a3c72bda29eb99">00086</a>     <a class="code" href="class_oryantasyon.html#acf7d589d8457438ca0a3c72bda29eb99" title="Default destructor.">~Oryantasyon</a>(){}
<a name="l00087"></a>00087 
<a name="l00093"></a><a class="code" href="class_oryantasyon.html#a9d9b215da976f63fe0b42d588f218c91">00093</a>     <span class="keyword">const</span> <a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a>&amp; <a class="code" href="class_oryantasyon.html#a9d9b215da976f63fe0b42d588f218c91" title="Esitleme islemi.">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a>&amp; diger)
<a name="l00094"></a>00094     {
<a name="l00095"></a>00095         <span class="keywordflow">if</span> (<a class="code" href="class_oryantasyon.html#abcd642c2cbb7c93a47c4ecdd3afed45d" title="Aci test methodu.">aciDegeriDogruMu</a>(azimuth))
<a name="l00096"></a>00096             azimuth = diger.azimuth;
<a name="l00097"></a>00097         <span class="keywordflow">else</span>
<a name="l00098"></a>00098             <span class="keywordflow">throw</span> <span class="keyword">new</span> std::invalid_argument(<span class="stringliteral">&quot;Aci standard araligin disinda!&quot;</span>);
<a name="l00099"></a>00099         
<a name="l00100"></a>00100         <span class="keywordflow">if</span> (<a class="code" href="class_oryantasyon.html#abcd642c2cbb7c93a47c4ecdd3afed45d" title="Aci test methodu.">aciDegeriDogruMu</a>(pitch))
<a name="l00101"></a>00101             pitch = diger.pitch;
<a name="l00102"></a>00102         <span class="keywordflow">else</span>
<a name="l00103"></a>00103             <span class="keywordflow">throw</span> <span class="keyword">new</span> std::invalid_argument(<span class="stringliteral">&quot;Aci standard araligin disinda!&quot;</span>);
<a name="l00104"></a>00104 
<a name="l00105"></a>00105         <span class="keywordflow">if</span> (<a class="code" href="class_oryantasyon.html#abcd642c2cbb7c93a47c4ecdd3afed45d" title="Aci test methodu.">aciDegeriDogruMu</a>(roll))
<a name="l00106"></a>00106             roll = diger.roll;
<a name="l00107"></a>00107         <span class="keywordflow">else</span>
<a name="l00108"></a>00108             <span class="keywordflow">throw</span> <span class="keyword">new</span> std::invalid_argument(<span class="stringliteral">&quot;Aci standard araligin disinda!&quot;</span>);
<a name="l00109"></a>00109 
<a name="l00110"></a>00110         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00111"></a>00111     }
<a name="l00112"></a>00112 
<a name="l00119"></a><a class="code" href="class_oryantasyon.html#abcd642c2cbb7c93a47c4ecdd3afed45d">00119</a>     <span class="keywordtype">bool</span> <a class="code" href="class_oryantasyon.html#abcd642c2cbb7c93a47c4ecdd3afed45d" title="Aci test methodu.">aciDegeriDogruMu</a>(<span class="keywordtype">double</span> aci){ <span class="keywordflow">return</span> aci&gt;=0 &amp;&amp; aci &lt;= 2*M_PI; }
<a name="l00120"></a>00120 
<a name="l00121"></a>00121     <span class="keywordtype">double</span> azimuth;
<a name="l00122"></a>00122     <span class="keywordtype">double</span> pitch;
<a name="l00123"></a>00123     <span class="keywordtype">double</span> roll;    
<a name="l00124"></a>00124 };
<a name="l00125"></a>00125 
<a name="l00133"></a><a class="code" href="class_pozisyon.html">00133</a> <span class="keyword">class </span><a class="code" href="class_pozisyon.html" title="Pozisyon sinifi. Uzayda bir referens noktasina gore pozisyonu (koordinate+oryantasyon) belirtir...">Pozisyon</a> 
<a name="l00134"></a>00134 {
<a name="l00135"></a>00135 <span class="keyword">public</span>:
<a name="l00136"></a>00136     
<a name="l00140"></a>00140     <a class="code" href="class_pozisyon.html#a6428949c2c6c44138591cde8c329fc5b" title="Default constructor.">Pozisyon</a>();
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 
<a name="l00153"></a><a class="code" href="class_pozisyon.html#a2956a9486900759e580b64e91b85f4e5">00153</a>     <a class="code" href="class_pozisyon.html#a6428949c2c6c44138591cde8c329fc5b" title="Default constructor.">Pozisyon</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> z, <span class="keywordtype">double</span> azimuth, <span class="keywordtype">double</span> pitch, <span class="keywordtype">double</span> roll) 
<a name="l00154"></a>00154     {
<a name="l00155"></a>00155         this-&gt;koordinat = <span class="keyword">new</span> <a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a>(x,y,z);
<a name="l00156"></a>00156         this-&gt;oryantasyon = <span class="keyword">new</span> <a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a>(azimuth, pitch, roll);
<a name="l00157"></a>00157     }
<a name="l00158"></a>00158 
<a name="l00164"></a><a class="code" href="class_pozisyon.html#a1b4c1eea52fb11788ae5e168abd82bbe">00164</a>     <a class="code" href="class_pozisyon.html#a6428949c2c6c44138591cde8c329fc5b" title="Default constructor.">Pozisyon</a>(<span class="keyword">const</span> <a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a> _koordinat, <span class="keyword">const</span> <a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a> _oryantasyon)
<a name="l00165"></a>00165     {
<a name="l00166"></a>00166 
<a name="l00167"></a>00167         this-&gt;koordinat = <span class="keyword">new</span> <a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a>(_koordinat);
<a name="l00168"></a>00168         this-&gt;oryantasyon = <span class="keyword">new</span> <a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a>(_oryantasyon);
<a name="l00169"></a>00169     }
<a name="l00170"></a>00170 
<a name="l00174"></a><a class="code" href="class_pozisyon.html#ad44756d7d84e42c7c2cb936bd9444f8e">00174</a>     <a class="code" href="class_pozisyon.html#ad44756d7d84e42c7c2cb936bd9444f8e" title="Default destructor.">~Pozisyon</a>()
<a name="l00175"></a>00175     {
<a name="l00176"></a>00176         <span class="keywordflow">if</span>(koordinat)   <span class="keyword">delete</span> koordinat;
<a name="l00177"></a>00177         <span class="keywordflow">if</span>(oryantasyon) <span class="keyword">delete</span> oryantasyon;
<a name="l00178"></a>00178     };
<a name="l00179"></a>00179 
<a name="l00185"></a><a class="code" href="class_pozisyon.html#a212fd7ccd2c66e5fc977929f43663f5c">00185</a>     <span class="keyword">const</span> <a class="code" href="class_pozisyon.html" title="Pozisyon sinifi. Uzayda bir referens noktasina gore pozisyonu (koordinate+oryantasyon) belirtir...">Pozisyon</a>&amp; <a class="code" href="class_pozisyon.html#a212fd7ccd2c66e5fc977929f43663f5c" title="Esitleme islemi.">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_pozisyon.html" title="Pozisyon sinifi. Uzayda bir referens noktasina gore pozisyonu (koordinate+oryantasyon) belirtir...">Pozisyon</a>&amp; diger)
<a name="l00186"></a>00186     {
<a name="l00187"></a>00187         *(this-&gt;koordinat) = *(diger.koordinat);
<a name="l00188"></a>00188         *(this-&gt;oryantasyon) = *(diger.oryantasyon);
<a name="l00189"></a>00189 
<a name="l00190"></a>00190         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00191"></a>00191     };
<a name="l00192"></a>00192 
<a name="l00193"></a>00193     <a class="code" href="class_koordinat.html" title="Koordinat sinifi. Uzayda bir referens noktasina gore konumunu belirtir.">Koordinat</a> *koordinat;
<a name="l00194"></a>00194     <a class="code" href="class_oryantasyon.html" title="Oryantasyon sinifi. Uzayda bir referens noktasina gore oryantasyonu belirtir.">Oryantasyon</a>*oryantasyon;
<a name="l00195"></a>00195 
<a name="l00196"></a>00196 };
<a name="l00197"></a>00197 
<a name="l00198"></a>00198 <span class="keyword">typedef</span> <span class="keywordtype">int</span>                         YorungeId;
<a name="l00199"></a>00199 <span class="keyword">typedef</span> std::vector&lt;Pozisyon*&gt;      Yorunge;
<a name="l00200"></a>00200 <span class="keyword">typedef</span> std::map&lt;YorungeId,Yorunge&gt; YorungeList;
<a name="l00201"></a>00201 
<a name="l00202"></a>00202 <span class="preprocessor">#endif // Pozisyon_h__</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Jan 4 2013 07:04:31 for Kablosuz Izci by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
